﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Windows.Web.Syndication;

namespace HDK.API.Syndication
{
    public interface ISyndicationPost
    {
        /// <summary>
        /// Gets or sets whether the user has read this post.
        /// </summary>
        [DataMember]
        bool IsRead { get; set; }

        /// <summary>
        /// Gets or sets the date the post was published.
        /// </summary>
        [DataMember]
        DateTimeOffset PublishedDate { get; set; }

        [DataMember]
        string Content { get; set; }

        [DataMember]
        string Title { get; set; }

        [DataMember]
        string Summary { get; set; }

    }

    /// <summary>
    /// Used to hold data relating to the posts/items
    /// of a <see cref="System.Architecture.Data.RSS.Channel"/> instance.
    /// </summary>
    [DataContract]
    public class SyndicationPost : ISyndicationPost
    {
        #region Constructor

        /// <summary>
        /// Initialize a new instance of the <see cref="RSSFeedReader.Data.Models.Post"/> class.
        /// </summary>
        public SyndicationPost()
        {
        }

        #endregion

        #region Public Properties


        /// <summary>
        /// Gets or sets whether the user has read this post.
        /// </summary>
        [DataMember]
        public bool IsRead { get; set; }

        /// <summary>
        /// Gets or sets the date the post was published.
        /// </summary>
        [DataMember]
        public DateTimeOffset PublishedDate { get; set; }

        [DataMember]
        public string Content { get; set; }

        [DataMember]
        public string Title { get; set; }

        [DataMember]
        public string Summary { get; set; }

        #endregion
    }

}
